<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
  <g:if test="${ytag != null && mtag != null}">
    <title><g:message code="g.gallery.title" args="${[monthMap[mtag.name], ytag.name]}" /></title>
  </g:if>
  <g:else>
    <title><g:message code="g.gallery.title.default" /></title>
  </g:else>
  <meta name="layout" content="main" />
  <g:javascript src="gallery.js"/>
  <link rel="stylesheet" type="text/css" href="${resource(dir:'css',file:'slideshow.css')}" />
</head>
<body>
  <div class="slideshow_wrapper">
  <table id="slideshow" class="slideshow">
    <tr>
      <td style="width:50%"></td>
      <td>
        <div class="wrapper">
          <div class="nav">
            <g:link action="index" params="[year:year, month:month]">
              <g:message code="g.slideshow.return" />
            </g:link>&nbsp;&nbsp;
            <a href="javascript:void(0)" id="s_prev">&laquo;
              <g:message code="g.slideshow.prev" /></a> |
            <span id="s_curr"></span>&nbsp;<g:message code="g.slideshow.of" />&nbsp;<span id="s_total"></span> |
            <a href="javascript:void(0)" id="s_next"><g:message code="g.slideshow.next" /> &raquo;</a>&nbsp;
            <a href="javascript:void(0)" id="s_fullsize" target="_blank"><g:message code="g.slideshow.download" /></a>
          </div>
          <img id="s_img" class="clickable" />
        </div>
      </td>
      <td style="width:50%"></td>
    </tr>
  </table>
  </div>
<g:javascript>
  var pics = ${json}
  var picUrl = '${grailsApplication.config.imagesPath}'
  var displayId = 1
  var displaySubdir = '${VersionType.PredefinedVersions[1].subdir}'
  Slideshow.Init(pics, ${index});
</g:javascript>
</body>
</html>
